<?
require('../phpQuery/phpQuery/phpQuery.php');

$fname='../../tpl/parse_dom.htm';
$html=file_get_contents($fname);


function getmicrotime($elapsed=false){
    list($usec, $sec) = explode(" ", microtime());
    $tm = ((float)$usec + (float)$sec);
    if ($elapsed) return $tm-$GLOBALS['jl_time_start'];
    else return $tm;
}

$pq=phpQuery::newDocumentFileHTML($fname);

$jl_time_start=getmicrotime();
for($i=0; $i<100;$i++){
	$tst=false;
	$pq->find('*[jcontrol]')->toReference($tst);
	//$tst->replaceWith('<span>'.$tst->attr('name').'</span>');
}
echo getmicrotime($jl_time_start);
echo $pg;
	

?>
